#include <iostream>
using namespace std;

void word(char input[], char output[])
{

	int len=strlen(input);
	char *strtemp=new char[len+1];
	memset(strtemp,0,len+1);
	char *p=input;
	int s=0;
	int j=0;
	int m=0;
	int i=0;
	while(p[j]='\0')
	{
		for (;i<len;)
		{
			if ('a'<=p[i]&&p[i]<='z'||'A'<=p[i]&&p[i]<='Z')
			{
				strtemp[s++]=p[i++];
			}
			else
			{ 
				i++;
				break;
			}

		}
		if (s>1)
		{
			for (int k=0;k<s;k++)
			{
				output[m++]=strtemp[k];
			}
			output[m]=' ';
			m++;
		}
		j=i;


	}



}
void my_word(char input[], char output[])
{
	int i=0;
	int j=0;
	int len=0;
	int k=0;
	int s=0;
	int m=0;
	while(input[len++]!='\0');
	cout<<len<<endl;
	char *tstr=new char[len];
	while(input[j]!='\0')
	{
		s=0;
		for(i=j;i<len-1;)
		{
			if((input[i]>='a'&&input[i]<='z')||(input[i]>='A'&&input[i]<='Z'))    
			{
				tstr[s++]=input[i++];
			}
			else
			{
				i++;
				break;
			}
		}
		if (s>1)
		{
			for(k=0;k<s;k++)
				output[m++]=tstr[k];
			output[m++]=' ';
		}
		j=i;
	}


	//cout<<j<<endl;
	delete [] tstr;


}
int main()
{
	char input[]="some local buses, some1234123drivers";
	int len=sizeof(input)/sizeof(input[0]);
	char *output=new char[len+1];
	my_word(input,output);
	cout<<output<<endl;
}